{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static "plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css" %}">
</head>
<body>
    <table class="table table-striped">
        <thead>
            <tr>
                <th>序号</th>
                <th>用户id</th>
                <th>用户名</th>
                <th>手机号</th>
                <th>性别</th>
                <th>角色</th>
                <th>操作</th>
            </tr>
        </thead>
        {% for i in findlist %}
            <tbody>
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ i.id }}</td>
                    <td>{{ i.username }}</td>
                    <td>{{ i.tel }}</td>
                    <td>{{ i.sex }}</td>
                    <td>{{ i.caracter }}</td>
                    <td>
                        <a href="/edit/{{ i.id }}">
                            <button type="button" class="btn btn-warning">编辑</button>
                        </a>
                        <a href="/delete/{{ i.id }}">
                            <button class="btn btn-danger" type="button" data-toggle="modal" data-target="#myModal">删除</button>
                        </a>
                        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                   <div class="modal-header">
                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="myModalLabel">确定要删除这条数据吗?</h4>
                                   </div>
                                   <div class="modal-body">
                                       请再三思考一旦删除无法找回!
                                   </div>
                                   <div class="modal-footer">
                                       <button type="button" class="btn btn-default" data-dismiss="modal">取消删除</button>
                                       <button type="button" class="btn btn-danger">确认删除</button>
                                   </div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </tbody>
        {% endfor %}
    </table>
    <a href="http://127.0.0.1:8000/home/">
        <button type="button" class="btn btn-primary">返回上一页</button>
    </a>
</body>
<script src="{% static "plugins/jquery.js" %}"></script>
<script src="{% static "plugins/bootstrap-3.3.7-dist/js/bootstrap.min.js" %}"></script>
</html>